package com.bjut.vendormgrsys.model.domain;

import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * 简历表
 */
@Data
@Entity
@Table(name = "resume")
public class ResumePO implements Serializable {

    /**
     * 主键ID
     */
    @Id
    @GeneratedValue(generator = "resume_id")
    @GenericGenerator(name = "resume_id", strategy = "uuid")
    @Column(name = "id", length = 32, unique = true, nullable = false)
    private String id;

    /**
     * 职位ID
     */
    @Column(name = "pid", length = 32, nullable = false)
    private String positionId;

    /**
     * 职位名称
     */
    @Column(name = "pname", length = 100, nullable = false)
    private String positionName;

    /**
     * 中文名
     */
    @Column(name = "name", length = 100, nullable = false)
    private String name;

    /**
     * 手机号
     */
    @Column(name = "phone", length = 20, nullable = false)
    private String mobile;

    /**
     * 电子邮箱
     */
    @Column(name = "email", length = 50, nullable = false)
    private String email;

    /**
     * 简历信息
     * Json
     */
    @Column(name = "info", columnDefinition = "MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL")
    private String info;

    /**
     * 状态
     * RECOMMENDING
     * PASS
     * REFUSE
     */
    @Column(name = "status", length = 20, nullable = false)
    private String status;

    /**
     * 创建人id
     */
    @Column(name = "creator", length = 32, nullable = false)
    private String creator;

    /**
     * 创建时间
     */
    @Column(name = "create_date", length = 13, updatable = false, nullable = false)
    private long createDate;

    /**
     * 更新时间
     */
    @Column(name = "last_updated", length = 13, nullable = false)
    private long lastUpdated;

}
